[JS] How to workaround same origin problem
Posted
by Ricky
on Stack Overflow
See other posts from Stack Overflow
or by Ricky
Published on 2010-05-26T11:56:52Z
Indexed on
2010/05/26
12:01 UTC
Read the original article
Hit count: 167
JavaScript
Hi guys:
The following JS will fail if the URL in mainFrame from a.abc.com to b.abc.com.
top.frames["mainFrame"].location.href = "/Users/xuenn.aspx?backUrl=" + top.frames["mainFrame"].location.href.split("?")[0];
This is the error message: Permission denied for http://a.abc.com to get property Location.href from http://b.abc.com.
Anybody knows how could I workaround this or think of other solutions?
© Stack Overflow or respective owner